<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件冒泡和默认行为</title>
    <script src="js/vue.js"></script>
    <script>
        window.onload = function() {
            new Vue({
                el: '#itany',
                methods: {
                    show(e) {
                        console.log("111");
                        e.stopPropagation();
                    },
                    print() {
                        console.log("222");
                    },
                    write () {
                        console.log("333");
                    }
                }
            });
        }
    </script>
</head>
<body>
    <div id="itany">
        <div @click="write">
            <p @click="print">
                <button @click="show($event)">点我</button>
            </p>
        </div>
    </div>
</body>
</html>